<template>
  <div class="todo-container">
    <div class="todo-wrap">
      <Header :addToList="addToList"/>
      <List :todoList="todoList" :alterDone="alterDone" :deleteItem="deleteItem"/>
      <Footer :todoList="todoList" :isCheckedAll="isCheckedAll" :deleteCheckedAll="deleteCheckedAll"/>
    </div>
  </div>
</template>

<script lang="ts">
import {defineComponent} from "vue";

export default defineComponent({
  name: "App",
});
</script>


<script setup lang="ts">
import Header from "./components/Header/index.vue";
import Footer from "./components/Footer/index.vue";
import List from "./components/List/index.vue";
import {useFunction} from './hooks/index'

const {addToList, alterDone, deleteItem, isCheckedAll, deleteCheckedAll, todoList} = useFunction()

</script>

<style>
/*base*/
body {
  background: #fff;
}

.todo-container {
  width: 600px;
  margin: 0 auto;
}

.todo-container .todo-wrap {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}
</style>
